<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<if condition="(I('get.display') eq 1)">
				<li><a href="{:U('Examine/loan_overdue_no')}">不催缴列表</a></li>
			<elseif condition="(I('get.display') eq 2)"/>
				<li><a href="{:U('Examine/other_finance')}">当天财务统计</a></li>
			<elseif condition="(I('request.disp') eq '4')"/>
				<li><a href="{:U('indexadmin/unlock')}">截套列表</a></li>
			<else/>
				<li><a href="{:U('Examine/loan_repaid')}">已还款列表</a></li>
				<li><a href="{:U('Examine/has_not_renew_repayment_list')}">已还款未借列表</a></li>
				<li><a href="{:U('report/today_paid_list')}">当日已还款列表</a></li>
			</if>
			<li class="active"><a>借款详情</a></li>
		</ul>
        <form class="form-horizontal js-ajax-form" method="post">
			<fieldset>
				<div class="tabbable">
					<div class="tab-content">
						
							<fieldset>
								<div class="control-group">
									<label class="control-label">姓名</label>
									<div class="controls">
										<php>$ds=array('0'=>'<span style="color:red">未认证</span>','1'=>'<span style="color:green">已认证</span>','2'=>'<span style="color:red">认证未通过</span>','3'=>'<span style="color:red">暂时不需要</span>')</php>
										<label class="control-label" style="width:auto">{$order.name}&nbsp&nbsp&nbsp&nbsp{$ds[$order['account_status']]}</label>
										<input type="hidden" name="options[id]" value="{$order.id}">
										<input type="hidden" name="options[user_id]" value="{$order.user_id}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">手机号码</label>
									<div class="controls">
										<label class="control-label" style="width:auto">{$order.mobile}</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">银行卡号</label>
									<div class="controls">
									<label class="control-label" style="width:auto">{$order.bank}：{$order.silver_card}&nbsp&nbsp&nbsp&nbsp预留手机号码&nbsp&nbsp{$order.silver_number}</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">借款金额</label>
									<div class="controls">
									<label class="control-label" style="width:auto">{$order.amount}元</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">借款天数</label>
									<div class="controls">
										<label class="control-label" style="width:auto">{$order.loan_day}天</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">放款日</label>
									<div class="controls">
										<label class="control-label" style="width:auto">{$order.loan_time}</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">分期数</label>
									<div class="controls">
										<label class="control-label" style="width:auto">{$order.stages}期</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">咨询费</label>
									<div class="controls">
									<label class="control-label" style="width:auto">{$order.interest}元</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">审核费</label>
									<div class="controls"><label class="control-label" style="width:auto">{$order.examine}元</label></div>
								</div>
								<div class="control-group">
									<label class="control-label">顾问费</label>
									<div class="controls"><label class="control-label" style="width:auto">{$order.consulting}元</label></div>
								</div>
								<div class="control-group">
									<label class="control-label">保证金</label>
									<div class="controls"><label class="control-label" style="width:auto">{$order['bond']['bond_amount']|default=0}元</label>
									<if condition="$order['bond']['bond_amount']">
										<if condition="$order['bond']['is_back'] eq 1">
										已还
										<else/>
										未还
										</if>
									</if>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">到期应还</label>
									<div class="controls"><label class="control-label" style="width:auto">{$order.loan_amount}元</label></div>
								</div>
								<br />
								<div class="control-group">
									<label class="control-label">分期详情</label>
									<div class="controls">
									<label class="control-label" style="width:auto">
										<!--<table border="1" style='text-align:center;width:800px' cellpadding='10px'>-->
										<table class="table table-bordered">
											<tr>
												<th>期数</th>
												<th>到期时间</th>
												<th>借款状态</th>
												<th>分期金额</th>
												<th>审核操作</th>
											</tr>
											<php>$stu_type=array('1'=>'借款中','2'=>'已还款','3'=>'逾期','4'=>'已到期','5'=>'审核中','6'=>'审核不通过','7'=>'驳回','8'=>'放款成功','9'=>'放款不成功','10'=>'待放款')</php>
											<php>$sub_count = count($sub);</php>
											<foreach name="sub" item="vo">
												<tr>
													<td>
														<eq name="sub_count" value="1">
															第1期
															<else/>
															第{:substr((string)$vo['stages'],0,1)}期
														</eq>
													</td>
													<td>{$vo.endtime}</td>
													<td>{$stu_type[$vo['status']]}</td>
													<td>{$vo.amount}</td>
													<td>
													<php>$sel=$vo['status']!=2?'checked="checked"':'disabled'</php>
														<span><input name="options[status][{$vo.stages}]" {$sel} type="radio" value="0" />借款中</span>&nbsp;&nbsp;&nbsp;&nbsp;
													<php>$sel=$vo['status']==2?'checked="checked" disabled':''</php>
														<span><input name="options[status][{$vo.stages}]" type="radio" {$sel} value="1" />已还款</span>
													</td>
												</tr>
											</foreach>
												<tr>
													<td>共{$order.stages}期</td>
													<td>{$order.loan_day}天</td>
													<td>{$stu_type[$order['status']]}</td>
													<td>{$order.amount}</td>
													<td></td>
												</tr>
										</table>
									</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">续期详情</label>
									<div class="controls">
									<label class="control-label" style="width:auto">
									<if condition="(empty($renewal))">
										暂无记录
									<else/>
										<!--<table border="1" style='text-align:center;width:800px' cellpadding='10px'>-->
										<table class="table table-bordered">
											<tr>
												<th>借款编号</th>
												<th>续期时间</th>
												<th>完结时间</th>
												<th>续期金额</th>
												<th>审核备注</th>
												<th>状态</th>
												<th>审核人</th>
											</tr>
											<foreach name="renewal" item="vo">
												<tr>
													<td>{$vo.order_id}</td>
													<td>{$vo.renewal}</td>
													<td>{$vo.endtime}</td>
													<td>{$vo.amount}</td>
													<td>{$vo.message}</td>
													<td>{$vo['status']==1?'审核成功':'审核失败'}</td>
													<td>{$lastuser[$vo['lastuser_id']]|default='系统'}</td>
												</tr>
											</foreach>
										</table>
									</if>
									</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">还款时间</label>
									<div class="controls"><label class="control-label" style="width:auto">{$order.endtime}</label></div>
								</div>
								<if condition="($logs neq null)">
								<div class="control-group">
									<label class="control-label">审核信息</label>
									<div class="controls">
									<label class="control-label" style="width:auto">
										<!--<table border="1" style='text-align:center;width:800px' cellpadding='10px'>-->
										<table class="table table-bordered">
											<tr>
												<th>审核类型</th>
												<th>审核时间</th>
												<th>审核人</th>
												<th>收款人</th>
												<th>审核备注</th>
												<th>金额</th>
												<th>实收金额<br/>(不含逾期费)</th>
												<th>实收逾期费</th>
												<th>微信实收</th>
												<th>支付宝实收</th>
												<th>银行实收</th>
												<th>审核操作</th>
											</tr>
											<php>$stu_type=array('1'=>'借款中','2'=>'已还款','3'=>'逾期','4'=>'已到期','5'=>'审核中','6'=>'审核不通过','7'=>'驳回','8'=>'放款成功','9'=>'放款不成功','10'=>'待放款');
											$stu_ty=array('0'=>'用户审核','1'=>'订单审核','2'=>'订单审核','3'=>'续期审核','4'=>'逾期还款(本金)','5'=>'逾期还款','6'=>'订单审核','7'=>'客户还款');
											</php>
											<foreach name="logs" item="vo">
												<tr>
													<td>{$stu_ty[$vo['types']]}</td>
													<td>{$vo.crtime}</td>
													<td>{$lastuser[$vo['examine_id']]|default='系统'}</td>
													<td>{$lastuser[$vo['payee']]}</td>
													<td>{$vo.message}</td>
													<td>{$vo.amount}</td>
													<td>{$vo.real_amount|default='0.00'}</td>
													<td>{$vo.overdue_amount|default='0.00'}</td>
													<td>{$vo.wechat_amount}</td>
													<td>{$vo.alipay_amount}</td>
													<td>{$vo.bank_amount}</td>
													<td>{$vo['status']?'审核成功':'审核失败'}</td>
												</tr>
											</foreach>
										</table>
									</label>
									</div>
								</div>
								</if>
							</fieldset>
					</div>
				</div>

			</fieldset>
		</form>
		
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>